﻿<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<div class="modal-dialog x-modal-dialog" style="width:600px;">

  <div class="modal-content">

    <div class="modal-header x-breadcrumb no-bottom-border clearfix">

      <h2><i class="glyphicon glyphicon-fire"></i>&nbsp;&nbsp;<span>标记发货</span></h2>

      <button type="button" class="close" data-dismiss="modal">&times;</button>

    </div>

    <form class="form-horizontal" method="POST" action="${ctx.host}/product-credit-orders/${order.id}/edit-address" data-validate="true">
    
      <input type="hidden" name="_method" value="PATCH">
      <input type="hidden" name="orderId" value="${order.id}">
    
    	 <div  class="form-group x-form-group">
          <label class="col-xs-3 control-label">收货人姓名：</label>
          <div class="pull-left col-xs-8">
          	 <input type="text" class="form-control" data-validate="required" name="contactName" value="${order.contactName}"/>
          </div>
         </div>
         <div  class="form-group x-form-group">
          <label class="col-xs-3 control-label">收货人号码：</label>
          <div class="pull-left col-xs-8">
          	 <input type="text" class="form-control" data-validate="required" name="contactPhone" value="${order.contactPhone}"/>
          </div>
         </div>
    	
    	<div class="form-group x-form-group">
            <label class="col-xs-2 control-label">所在城市：</label>
            <div class="pull-left col-xs-3">
              <select name="province" id="loc_province" class="form-control select2" data-validate="required">
              </select> 
            </div>
            
            <div class="pull-left col-xs-3">
              <select name="city" id="loc_city" class="form-control select2" data-validate="required">
              </select> 
            </div>
            
            <div class="pull-left col-xs-4">
              <select name="region" id="loc_town" class="form-control select2" data-validate="required">
              </select> 
            </div>
          </div>
    	
        <div  class="form-group x-form-group">
          <label class="col-xs-3 control-label">详细地址：</label>
          <div  class="col-xs-8">
          	<textarea name="address" rows="5" style="width: 100%;" data-validate="required">${order.address}</textarea>
          </div>
        </div>
        

      <div class="modal-footer">
        <button type="submit" class="btn btn-success btn-shadow btn-shadow-success x-btn">确定</button>&nbsp;&nbsp;&nbsp;&nbsp;
        <button type="button" class="btn btn-default btn-shadow btn-shadow-default x-btn" data-dismiss="modal">取消</button>
      </div>
    </form>

  </div>
</div>
<script>
   var province = '${order.province}', city = '${order.city}', region = '${order.region}'
	showLocation(province, city, region);
</script>

